<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="ie=edge" />
        <title>Knockout.js</title>

        <link rel="stylesheet" href="style.css" />
    </head>
    <body>
        <div id="root">
            <h2>用户列表</h2>
            <div
                data-bind="template: { name: 'person-template', foreach: people }"
            ></div>
        </div>

        <!-- template -->
        <script type="text/html" id="person-template">
            <div class="person-card">
                <h3 class="name" data-bind="text: name"></h3>
                <p>信用分: <span data-bind="text: credits"></span></p>
            </div>
        </script>
        <script src="../scripts/lib/require.js" data-main="index.js"></script>
    </body>
</html>
